
<?php include_once './application/views/sys_admin/common/header.php';  ?>
<?php 
$sex = $v['sex'];
$statusArr = $v['statusArr'];
$cardType = $v['cardType'];
?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once './application/views/sys_admin/common/user_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>客户管理</strong> &gt;&gt;  添加客户
		</div>
		
		<div class="admin_right_info">
			<form id="myform">
			<!-- <div class="admin_right_info_title"><h2>用户基础信息</h2></div> -->
			<input type="hidden" name="act" value="add"/>
			<ul>
			<li>用户编辑</li>
			<li>用户名：<input type="text" name="username" id="username" /></li>
			<li>邮箱：<input type="text" name="email" id="email" /> </li>
			<li>登陆密码：<input type="password" name="password" id="password"/> </li>
			<li>确认密码：<input type="password" name="password2" id="password2" /> </li>
			<li>真实姓名：<input type="text" name="realname" id="realname" /> </li>
			<li>性别：
				<input type="radio" name="sex" value="1" checked='checked'/>男  
				<input type="radio" name="sex" value="2" />女
			</li>
			<li>生日：<input type="text" name="birthday" id="birthday" onfocus="WdatePicker()" /> </li>
			<li>客户类型：
				<select name="type_id">
					<option value="2">普通客户</option>
					<option value="3">客服</option>
				</select> 
			</li>
			<li>状态：
				<input type="radio" name="fstatus" value="0"/>关闭  
				<input type="radio" name="fstatus" value="1"/>开通
				<input type="radio" name="fstatus" value="3"/>注销
				<input type="radio" name="fstatus" value="4"/>冻结
			</li>
			
			<li>证件类型：
				<select name="card_type">
				<?php foreach ($cardType as $k=>$v){?>
					<option value="<?php echo $k;?>"><?php echo $v;?></option>
				<?php }?>
				</select> 
				<input type="text" name="card_id" id="card_id" />
			</li>
			<li>手机：<input type="text" name="phone" id="phone"/> </li>
			<li>QQ：<input type="text" name="qq" id="qq"/> </li>
			<li><input type="button" value="确认修改" onclick="toSubmit()"/></li>
			</ul>
			</form>
<script>
function toSubmit(){
	var options = {
		url : GetUrlRelativePath(),
		dataType: "json",
		type:"post",
		success : function(ret) {
			$('#dialog').dialog({
				modal:true,
				title:'系统提示',
				buttons:{"确定":function(){$(this).dialog("close");}},
				close: function() {
					location=ret.url;
				}
			}); 
			$("#msg").html(ret.msg);
		}
	};
	$("#myform").ajaxSubmit(options);
	return false;
}
</script>			
			
			
		</div>
			
			
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
<div id="dialog" style="display:none">
<p id="msg" style="text-align:center"></p>
</div>
</body>
</html>
